package hu.szyrt.bug.views;

import hu.szyrt.bug.R;
import hu.szyrt.bug.utils.Assets;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.Button;

public class BUGButton extends Button {

	Assets assets;
	
	public BUGButton(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		init(context);
	}

	public BUGButton(Context context, AttributeSet attrs) {
		super(context, attrs, R.style.Button);
		init(context);
	}

	public BUGButton(Context context) {
		super(context);
		init(context);
	}
	
	private void init(Context context){
		this.assets = new Assets(context);
		setTypeface(assets.getButtonTypeface());
		setLineSpacing(-7, 1);
		setPadding(13, -17, 12, -15);
	}

	@Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        setMeasuredDimension(getMeasuredWidth() + 10, getMeasuredHeight() + 50);       
    }

	
}
